import request from '@/utils/request'

// 查询AllocationDetail列表
export function listAllocationDetail(query) {
  return request({
    url: '/AllocationDetail/list',
    method: 'get',
    params: query
  })
}

// 查询AllocationDetail详细
export function getAllocationDetail(allocationNo) {
  return request({
    url: '/AllocationDetail/' + allocationNo,
    method: 'get'
  })
}

// 新增AllocationDetail
export function addAllocationDetail(data) {
  return request({
    url: '/AllocationDetail',
    method: 'post',
    data: data
  })
}

// 修改AllocationDetail
export function updateAllocationDetail(data) {
  return request({
    url: '/AllocationDetail',
    method: 'put',
    data: data
  })
}

// 删除AllocationDetail
export function delAllocationDetail(allocationNo) {
  return request({
    url: '/AllocationDetail/' + allocationNo,
    method: 'delete'
  })
}

//新增多个调拨详情
export function addAllocationDetailList(data) {
  return request({
    url: '/AllocationDetail/insert/list',
    method: 'post',
    data: data
  })
}

//根据调拨编号获取货品详情
export function getRawProductDetailByAllocationNo(allocationNo) {
  return request({
    url: '/AllocationDetail/rawProductDetail/allocationNo',
    method: 'post',
    data: allocationNo
  })
}

